<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>职位</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="Hosting Store Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>

    <%--<link href="${pageContext.request.contextPath}/static/admin/assets/css/minimal.css" rel="stylesheet"/>--%>
    <link href="${pageContext.request.contextPath}/static/home/css/bootstrap.css" rel='stylesheet' type='text/css' />

    <script src="${pageContext.request.contextPath}/static/home/js/jquery-1.11.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/admin/assets/js/vendor/bootstrap/bootstrap.min.js"></script>
    <!-- Custom Theme files -->
    <link href="${pageContext.request.contextPath}/static/home/css/style.css" rel='stylesheet' type='text/css' />
    <!-- Custom Theme files -->

    <!-- webfonts -->
    <link href='${pageContext.request.contextPath}/static/home/css/font-awesome.css' rel='stylesheet' type='text/css'/>
    <!-- webfonts -->
    <!-- dropdown -->
    <script src="${pageContext.request.contextPath}/static/home/js/jquery.easydropdown.js"></script>

    <link href="${pageContext.request.contextPath}/static/home/css/nav.css" rel="stylesheet" type="text/css" media="all"/>
    <link href="${pageContext.request.contextPath}/static/admin/css/sweetalert.css" rel="stylesheet">

    <!-- start-smoth-scrolling -->
    <script src="${pageContext.request.contextPath}/static/admin/js/sweetalert.min.js"></script>
    <!-- start-smoth-scrolling -->
    <!-- webfonts -->
    <%--<link href='http://fonts.useso.com/css?family=Ubuntu:300,400,500,700' rel='stylesheet' type='text/css'>--%>
    <!-- webfonts -->
    <!-- start-smoth-scrolling -->
    <%--<link href="${pageContext.request.contextPath}/static/admin/assets/css/vendor/bootstrap/bootstrap.min.css" rel="stylesheet"/>--%>

    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/home/css/bootstrap-checkbox.css">
    <style>
        .register-but input[type="button"] {
            background:#1BBC9B;
            color: #FFF;
            font-size: 1.2em;
            padding: 0.6em 2em;
            transition: 0.5s all;
            -webkit-transition: 0.5s all;
            -moz-transition: 0.5s all;
            -o-transition: 0.5s all;
            display: inline-block;
            text-transform: uppercase;
            border:none;
            outline:none;
        }
        .register-but input[type="button"]:hover {
            background:#000;
        }
    </style>
</head>
<!-- Header Starts Here -->
<div class="banner inner-banner" >
    <%@include file="../header.jsp"%>

    <div id="breadcrumb_wrapper">
        <div class="container">

            <h3><strong>职位结果</strong></h3>
            <h6>&nbsp;</h6>

            <div class="clearfix"></div>
        </div>
    </div>
</div>
<div class="clearfix"> </div>
<!-- Header Ends Here -->

<!--Main Starts Here-->
<div class="container">
    <div class="row" id="row">

        <div id="home">

        </div>
        <div class="clearfix"> </div>
        <div class="tile-footer bg-transparent-white-2 rounded-bottom-corners">
            <div class="row">

                <div class="col-sm-offset-4 col-sm-4 text-center" style="margin-top: 3%">
                    <small class="inline table-options paging-info"></small>
                </div>

                <div class="col-sm-4 text-right sm-center">
                    <ul class="pagination pagination-xs nomargin pagination-custom">

                    </ul>
                </div>

            </div>
        </div>
    </div>
</div>


<div id="div_tmp" style="display: none">
    <div class="col-sm-6 col-md-3 PlanPricing">
        <div class="planName"> <span class="price btn-lg btn-success detail" style="cursor: pointer" onclick="detail()">详情</span>
            <h3 style="height: 16px;overflow: hidden;">公司名称:傻逼东软</h3>
            <h3 style="height: 16px;overflow: hidden;">主要方向:苦力</h3>
            <h3>福利:无</h3>
        </div>
        <div class="planFeatures">
            <ul style="word-break:break-all">
                <li><strong>职位名称: 忽悠经理</strong></li>
                <li><strong>月薪: 1000000000</strong></li>
                <li><strong>地点: 广州</strong></li>
                <li><strong>学历要求: 大帅比</strong></li>
                <li><strong>工作经验: 耐操</strong></li>
            </ul>
        </div>
    </div>
</div>


<!-- #Footer -->
<%@include file="../footer.jsp"%>
<!-- /#Footer -->
<!-- here stars scrolling icon -->
<script type="text/javascript" src="${pageContext.request.contextPath}/static/home/js/move-top.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/home/js/easing.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/home/js/moment.min.js"></script>
<script src="${pageContext.request.contextPath}/static/admin/js/page.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/home/js/daterangepicker-1.3.7.js"></script>
<script type="text/javascript">
    jQuery(document).ready(function($) {
        $(".scroll").click(function(event){
            event.preventDefault();
            $('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
        });
    });
</script>
<!-- /#Footer -->
<!-- here stars scrolling icon -->
<script type="text/javascript">
    $(document).ready(function() {
        /*
         var defaults = {
         containerID: 'toTop', // fading element id
         containerHoverID: 'toTopHover', // fading element hover id
         scrollSpeed: 1200,
         easingType: 'linear'
         };
         */

        $().UItoTop({ easingType: 'easeOutQuart' });

    });
</script>

<!-- //here ends scrolling icon -->



<script>

    var fetchData = function (furl) {
        var show = "";
        if(furl==null) {
            url = "${pageContext.request.contextPath}/getSearchList.action?p=1";
        }else{
            url = furl;
        }
        $.ajax({
            type:'get',
            url:url,
            dataType:'json',
            data:{
                search_name:'${searchJobPage.search_name}',
                job_property_id:${searchJobPage.job_property_id},
                salary_type_id:${searchJobPage.salary_type_id},
                degree_id:${searchJobPage.degree_id},
                city_id:${searchJobPage.city_id},
                industry_id:${searchJobPage.industry_id}
            },
            success:function(json){
                console.log(json);
                show = json.show;
                if (show=="" ||show.totalRows == 0) {
                    $("#home").html('<div colspan="10" align="center">暂无记录</div>');
                    $('#row .paging-info').html("showing 0-0 of 0 items");
                    $('#row .pagination').html("");
                    return;
                } else {
                    var list = json.data;
                    var body = $('#home');
                    var temp_body = $('#div_tmp');
                    var hs = $('#div_tmp h3');
                    var lis = $('#div_tmp li');
                    var string = "";
                    console.log(list);
                    for (var i in list) {
                        console.log(list[i].number);
                        //$('.detail').attr("id",list[i].job_id);
                        $('.detail').attr("onclick","detail("+list[i].job_id+")");
                        hs[0].innerHTML = "公司名称:"+list[i].company.company_name;
                        hs[1].innerHTML = "主要方向:"+list[i].jobType.job_type_name;
                        hs[2].innerHTML = "地点:"+list[i].zone.name + list[i].city.name;
                        lis[0].innerHTML = "职位名称:"+list[i].job_name;
                        lis[1].innerHTML = "月薪:"+list[i].salaryType.value;
                        lis[2].innerHTML = "学历要求:"+list[i].degree.degree_name;
                        lis[3].innerHTML = "招聘人数:"+list[i].number;
                        lis[4].innerHTML = "发布时间:"+list[i].date_start_string;
                        string += temp_body.html();
                    }
                    body.html(string);
                    if(show.currentPage == show.totalPage){
                        $('#row .paging-info').html("showing "+(show.startIndex+1)+"-"+show.totalRows+" of "+show.totalRows+" items");
                    }else {
                        $('#row .paging-info').html("showing "+(show.startIndex+1)+"-"+show.endIndex+" of "+show.totalRows+" items");
                    }
                    make_page(show, '#row .pagination','?');
                }
            }
        });
    };
    fetchData();
</script>

<script>

    function detail(id) {
        //swal("","请登录!!!","error");
        window.location.href="${pageContext.request.contextPath}/home/customer/jobDetail.action?job_id="+id;
    }


</script>
</body>
</html>
